﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using DICE_GS;

public enum LANGUAGE
{
    KOR,
    ENG
}

public enum PopupTypes
{
    ServerError = 0,
    NeedUpdate,
    BuyItem,
    NeedMoreGold,
    NeedMoreCash,
    FacebookConnectionSelect,
    DeleteFriend
}

public class LTDefine {
    private static LANGUAGE _language = LANGUAGE.KOR;
    public static LANGUAGE language
    {
        get
        {
            return _language;
        }

        set
        {
        }
    }

	static void GetAllChildTransform(Transform t, ref List<Transform> list)
	{
		foreach(Transform child in t)
		{
			list.Add(child);
			GetAllChildTransform(child, ref list);
		}
	}
	
	public static void SetAllChildTransformLayer(Transform t, int layerIndex)
	{
		t.gameObject.layer = layerIndex;
		foreach(Transform child in t)
		{
			child.gameObject.layer = layerIndex;
			SetAllChildTransformLayer(child, layerIndex);
		}
	}
}

public class RankingInfo
{
    public int ranking;
    public int userId;
    public string userName;
    public int totalBattleCount;
    public int winCount;
    public int retireCount;
    public int point;
	public int pawn;

    public RankingInfo(int ranking, int userId, string userName, int totalBattleCount, int winCount, int retireCount, int point, int pawn)
    {
        this.ranking = ranking;
        this.userName = userName;
        this.totalBattleCount = totalBattleCount;
        this.winCount = winCount;
        this.retireCount = retireCount;
        this.point = point;
		this.pawn = pawn;
    }
}

public enum BUILDTYPE
{
    PRODUCT,
    DEVELOP,
    QA,
	CUSTOM
}

public class FriendInfo
{
    public int userDBID = 0;
    public int leaderUnitClassId = 0;
    public int friendLevel = 0;
    public string friendName = "";
    public System.DateTime lastLoginTime = new System.DateTime();
	public int[] skill = new int[2];

    public FriendInfo(int dbid, int classid, int level, string name, string time, int skill1, int skill2)
    {
        userDBID = dbid;
        leaderUnitClassId = classid;
        friendLevel = level;
        friendName = name;
        lastLoginTime = System.DateTime.Parse(time);
		skill[0] = skill1;
		skill[1] = skill2;
    }
}

public class MailInfo
{
	public int id;
	public string name;
	public string title;
	public int senderType;
	public int attachType;
	public int attachId;
	public int attachAmount;
	public string dateString;
	
	public MailInfo(int id, string name, string title, int senderType, int attachType, int attachId, int attachAmount, string dateString)
	{
		this.id = id;
		this.name = name;
		this.title = title;
		this.senderType = senderType;
		this.attachType = attachType;
		this.attachId = attachId;
		this.attachAmount = attachAmount;
		this.dateString = dateString;
	}
}

public enum UNITELEMENT
{
    None,
    Sky, 
    Earth,
    Ocean
}
